<?php
if(!defined('IN_KKFRAME')) exit();
if(!$nav) $nav = array();

$title = array_reverse(array_keys($nav));
$title[] = $_K['config']['main']['sitename'];
$title = implode(' - ', $title);
echo <<<EOF
<!DOCTYPE html>
<html>
<head>
<title>{$title}</title>
<meta name="HandheldFriendly" content="true" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta http-equiv="Content-Type" content="text/HTML; charset=utf-8">
<meta name="description" content="{$description}" />
<meta name="author" content="kookxiang" />
<meta name="copyright" content="KK's Laboratory" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" href="template/default/style/mobile.css" type="text/css" />
</head>
<body>
<div class="wrapper">
<div class="header-bar">
<div class="header content clearfix">
<a id="hreder-link" href="./" rel="index" title="{$_K[config][main][sitename]}">
<img class="logo" src="template/default/style/mobile.png" alt="{$_K[config][main][sitename]}">
</a>
<span id="link-signup" class="signup">
EOF;
if($_K['uid']){
	echo '<a href="avatar.php" title="修改头像？"><b>'.$_K['member']['username'].'</b></a>';
	if($_K['notice']){
		echo ' <a href="notice.php" class="notice_new">您有'.$_K['notice'].'个未读提醒</a>';
	}else{
		echo ' <a href="notice.php?showall=yes">提醒</a>';
	}
	echo ' (<a href="member.php?logout='.$_K['formhash'].'">退出</a>)';
}elseif(!defined('IN_ROBOT')){
	echo '<a href="member.php?do=login">登录</a> / <a href="member.php?do=register">注册</a>';
}
echo <<<EOF
</span>
</div>
</div>

<ul class="nav">
<li class="home"><a href="./">{$_K[config][main][sitename]}</a></li>
EOF;

foreach ($nav as $name=>$link){
	$link = $link ? ' href="'.$link.'"' : '';
	echo '<li><a'.$link.'>'.$name.'</a></li>';
}

echo <<<EOF
</ul>
<div class="main content clearfix">
EOF;
?>